package com.ruoyi.gxdj.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import com.ruoyi.gxdj.Vo.IdentityVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.gxdj.mapper.InfoIdentityUpMapper;
import com.ruoyi.gxdj.domain.InfoIdentityUp;
import com.ruoyi.gxdj.service.IInfoIdentityUpService;

/**
 * 身份晋升Service业务层处理
 * 
 * @author ruoyi
 * @date 2024-03-18
 */
@Service
public class InfoIdentityUpServiceImpl implements IInfoIdentityUpService 
{
    @Autowired
    private InfoIdentityUpMapper infoIdentityUpMapper;

    /**
     * 查询身份晋升
     * 
     * @param id 身份晋升主键
     * @return 身份晋升
     */
    @Override
    public InfoIdentityUp selectInfoIdentityUpById(Long id)
    {
        return infoIdentityUpMapper.selectInfoIdentityUpById(id);
    }

    /**
     * 查询身份晋升列表
     * 
     * @param infoIdentityUp 身份晋升
     * @return 身份晋升
     */
    @Override
    public List<InfoIdentityUp> selectInfoIdentityUpList(InfoIdentityUp infoIdentityUp)
    {
        return infoIdentityUpMapper.selectInfoIdentityUpList(infoIdentityUp);
    }

    /**
     * 新增身份晋升
     * 
     * @param infoIdentityUp 身份晋升
     * @return 结果
     */
    @Override
    public int insertInfoIdentityUp(InfoIdentityUp infoIdentityUp)
    {
        infoIdentityUp.setCreateTime(DateUtils.getNowDate());
        return infoIdentityUpMapper.insertInfoIdentityUp(infoIdentityUp);
    }

    /**
     * 修改身份晋升
     * 
     * @param infoIdentityUp 身份晋升
     * @return 结果
     */
    @Override
    public int updateInfoIdentityUp(InfoIdentityUp infoIdentityUp)
    {
        return infoIdentityUpMapper.updateInfoIdentityUp(infoIdentityUp);
    }

    /**
     * 批量删除身份晋升
     * 
     * @param ids 需要删除的身份晋升主键
     * @return 结果
     */
    @Override
    public int deleteInfoIdentityUpByIds(Long[] ids)
    {
        return infoIdentityUpMapper.deleteInfoIdentityUpByIds(ids);
    }

    /**
     * 删除身份晋升信息
     * 
     * @param id 身份晋升主键
     * @return 结果
     */
    @Override
    public int deleteInfoIdentityUpById(Long id)
    {
        return infoIdentityUpMapper.deleteInfoIdentityUpById(id);
    }

    @Override
    public List<IdentityVo> selectInfoIdentityUpListAll(InfoIdentityUp infoIdentityUp) {
        return infoIdentityUpMapper.selectInfoIdentityUpListAll(infoIdentityUp);
    }

    @Override
    public List<InfoIdentityUp> listlistUserById(Long userId) {
        return infoIdentityUpMapper.listlistUserById(userId);
    }

    @Override
    public InfoIdentityUp selectInfoIdentityUpByUser(Long userId) {
        return infoIdentityUpMapper.selectInfoIdentityUpByUser(userId);
    }
}
